

from sketchz import *
from box import ana

window = WindowSur((1000, 800))
window.img.clear_value = (0.6, 0.7, 0.8, 1)

from sdl2.ext import FontTTF
Rect = sdl2.SDL_Rect

font = FontTTF("tuffy.ttf", "60px", (40, 40, 40, 255))       # 尼玛这里就是255级的



box = Obj()
box1 = make_block(U3(1, 1, 1))

code = 'x333-(x3+y3+z3)'
code = 'x33+y33'
code = 'z3+z33-y3'
code = 'z233-x3-y3'
for x, y, z in ana(code):
  box1.t.pos = U3(x, y, z)
  box1.as_unit() >> box


box.color = V3(1, 1, 1)
box.prog = prog1_mc
box.u(window)
box >> window

text = font.render_text(code, width=window.size[0]-200)
sdl2.SDL_BlitSurface(text, None, window.screen, Rect(100, 100, 800, 800))
window.flush_screen()



camera = window.camera
camera.t.pos = U3(0, -5, 1)

#walker = WalkerAndroid(camera)
walker = Viewer(camera)
walker >> window


window.mainloop()
